import axios from "@/utils/request";
import Vue from "vue";

const Api = {
    getAllTable: "/admin/table",
    updateTalbeState: "/admin/table",
    addTable: "/admin/table",
    deleteTable: "/admin/table",
  };

  export function getAllTable() {
    return axios({
      url: Api.getAllTable,
      method: "get",
    });
  }

  export function updateTalbeState(parameter) {
    return axios({
      url: Api.updateTalbeState,
      method: "put",
      data:parameter
    });
  }

  export function addTable(parameter) {
    return axios({
      url: Api.addTable,
      method: "post",
      data:parameter,
    });
  }

  export function deleteTable(parameter) {
    return axios({
      url: Api.deleteTable,
      method: "delete",
      params:parameter,
    });
  }